//
//  DownLoader.h
//  reLoadImages
//
//  Created by bao_wsfk on 12-7-13.
//  Copyright (c) 2012年 __MyCompanyName__. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface DownLoader : NSObject{
    
    NSString *notificationName;
	NSMutableDictionary *requestSummary;
	
	long long expectedData;
	NSMutableData *receivedData;
	float fakeProgress;
	
	NSURLConnection *connectionRef;
	
	UIActivityIndicatorView * progressWheel;
	UIProgressView *progressBar;
	UIAlertView *progressAlert;
    
    BOOL isDone;
}

@property (nonatomic, retain) NSURLConnection *connectionRef;

//初始化downloader
- (id)initDownloader:(NSString *)observerName;
//发送请求
- (void)makeHTTPRequest:(NSString *)urlAddress;

//初始化进度条
- (void)initProgress;
//通知
- (void)postNotification;
//取消连接
- (void)cancelConnection;
//处理错误
- (void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error;

@end
